package cn.ichiva.puppet.example.base.p1;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.fxml.FXML;
import javafx.fxml.impl.AbstractPuppetComponent;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;

/**
 * 双向绑定
 */
public class L1BindComponent extends AbstractPuppetComponent {

    @FXML
    StringProperty message = new SimpleStringProperty("简单数据绑定");

    @Override
    public CharSequence render() {
        imports(VBox.class, Label.class);
        return """
                <VBox>
                    <Label text="${message}" />
                </VBox>
                """;
    }
}
